package org.example;

/**
 * @author TonySong
 * @date ${DATE}
 * @time ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        //判断String的为空有几种方式？
        String s1="";
        //equals ==
        System.out.println("".equals(s1));//true
        System.out.println(s1.length()==0);//true OK
        System.out.println(null == s1);//false
        System.out.println(s1.isEmpty());//true
        //那种方式效率最高
    }
}